package com.ymttest.database.mapping.thirdpartysync;

import com.ymttest.database.model.thirdpartysync.promoterproduct;
import com.ymttest.database.model.thirdpartysync.promoterproductExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface promoterproductMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @SelectProvider(type=promoterproductSqlProvider.class, method="countByExample")
    int countByExample(promoterproductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @DeleteProvider(type=promoterproductSqlProvider.class, method="deleteByExample")
    int deleteByExample(promoterproductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Delete({
        "delete from promoterproduct",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Insert({
        "insert into promoterproduct (Id, ProductId, ",
        "Pid, TrackId, OuterParam)",
        "values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=VARCHAR}, ",
        "#{pid,jdbcType=VARCHAR}, #{trackId,jdbcType=VARCHAR}, #{outerParam,jdbcType=VARCHAR})"
    })
    int insert(promoterproduct record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @InsertProvider(type=promoterproductSqlProvider.class, method="insertSelective")
    int insertSelective(promoterproduct record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @SelectProvider(type=promoterproductSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Pid", property="pid", jdbcType=JdbcType.VARCHAR),
        @Result(column="TrackId", property="trackId", jdbcType=JdbcType.VARCHAR),
        @Result(column="OuterParam", property="outerParam", jdbcType=JdbcType.VARCHAR)
    })
    List<promoterproduct> selectByExample(promoterproductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Select({
        "select",
        "Id, ProductId, Pid, TrackId, OuterParam",
        "from promoterproduct",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Pid", property="pid", jdbcType=JdbcType.VARCHAR),
        @Result(column="TrackId", property="trackId", jdbcType=JdbcType.VARCHAR),
        @Result(column="OuterParam", property="outerParam", jdbcType=JdbcType.VARCHAR)
    })
    promoterproduct selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterproductSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") promoterproduct record, @Param("example") promoterproductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterproductSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") promoterproduct record, @Param("example") promoterproductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @UpdateProvider(type=promoterproductSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(promoterproduct record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table promoterproduct
     *
     * @mbggenerated Sat Jan 04 17:38:27 CST 2020
     */
    @Update({
        "update promoterproduct",
        "set ProductId = #{productId,jdbcType=VARCHAR},",
          "Pid = #{pid,jdbcType=VARCHAR},",
          "TrackId = #{trackId,jdbcType=VARCHAR},",
          "OuterParam = #{outerParam,jdbcType=VARCHAR}",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(promoterproduct record);
}